<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 父类
        class Persion{
            constructor(name){
                this.name = name;
            }
            showName(){
                return `名字为：${this.name}`
            }
        }
        // 子类
        class Student extends Persion{

        }
        // 调用
        let Stu1 = new Student('小明', '逃学')
        console.log(Stu1.showName());
       
    </script>
</head>
<body>
    
</body>
</html>